package com.leo.blog.login.web;

import org.springframework.boot.configurationprocessor.json.JSONException;

import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @Classname LoginController
 * @Description TODO
 * @Date 2023/4/13 10:09
 * @Created by XiongXiong
 * @Author: X.I.O
 */
@RestController
@RequestMapping("/user")
public class LoginController {

    @PostMapping("/login")
    public Map<String,Object> logincontroller(@RequestParam("password")String password,
                                              @RequestParam("username")String username
    ){
        Map<String,Object> jsonObject=new HashMap<>();
        return jsonObject;
    }

    @GetMapping("islogin")
    public Map<String,Object> isLoginController() throws JSONException {
        Map<String,Object> jsonObject=new HashMap<>();
        jsonObject.put("code",0);
        jsonObject.put("msg","success");
        return jsonObject;
    }
}
